/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package network.Base;

import network.Base.Exceptions.IDLessZeroException;

/**
 *
 * @author Lega
 */
public class ID {
    private int id;
    public ID(int id_) throws IDLessZeroException {
        if (id_ <= 0) {
            throw new IDLessZeroException("ID: id less that zero");
        }

        id = id_;
    }

    public int self() {
        return id;
    }

    public void inc() {
        id++;
    }

    public int getID() {
        return id;
    }
}
